package com.hualude.roadsign.model;

import com.hualude.roadsign.utils.FormatNumber;

import javax.persistence.*;

/**
 * Created by xu_jiaHui on 2017/10/13.
 */
@Entity
@Table(name = "tb_port", schema = "hualude_db", catalog = "")
public class PortEntity {
    private Integer portId;
    private Integer portNum;
    private Integer portState;
    private Double portMeterValue;
    private Double portMeterMin;
    private Double portMeterMax;
    private String deviceId;
    private String createTime;
    private String updateTime;

    public PortEntity() {
    }

    public PortEntity(Integer portNum, Integer portState, Double portMeterValue, Double portMeterMin, Double portMeterMax, String deviceId) {
        this.portNum = portNum;
        this.portState = portState;
        this.portMeterValue = portMeterValue;
        this.portMeterMin = portMeterMin;
        this.portMeterMax = portMeterMax;
        this.deviceId = deviceId;
        this.createTime= FormatNumber.getTime();
        this.updateTime= FormatNumber.getTime();
    }


    @Id
    @Column(name = "PortId")
    @GeneratedValue ( strategy = GenerationType.IDENTITY )
    public Integer getPortId() {
        return portId;
    }

    public void setPortId(Integer portId) {
        this.portId = portId;
    }

    @Basic
    @Column(name = "PortNum")
    public Integer getPortNum() {
        return portNum;
    }

    public void setPortNum(Integer portNum) {
        this.portNum = portNum;
    }

    @Basic
    @Column(name = "PortState")
    public Integer getPortState() {
        return portState;
    }

    public void setPortState(Integer portState) {
        this.portState = portState;
    }

    @Basic
    @Column(name = "PortMeterValue")
    public Double getPortMeterValue() {
        return portMeterValue;
    }

    public void setPortMeterValue(Double portMeterValue) {
        this.portMeterValue = portMeterValue;
    }

    @Basic
    @Column(name = "PortMeterMin")
    public Double getPortMeterMin() {
        return portMeterMin;
    }

    public void setPortMeterMin(Double portMeterMin) {
        this.portMeterMin = portMeterMin;
    }

    @Basic
    @Column(name = "PortMeterMax")
    public Double getPortMeterMax() {
        return portMeterMax;
    }

    public void setPortMeterMax(Double portMeterMax) {
        this.portMeterMax = portMeterMax;
    }

    @Basic
    @Column(name = "DeviceId")
    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    @Basic
    @Column(name = "CreateTime")
    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "UpdateTime")
    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

  
}
